package com.yue.jerseyexec;

import com.yue.jerseyexec.resource.helloworld.IHelloWorld;
import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.stereotype.Component;

import javax.ws.rs.ApplicationPath;

/**
 * Created by hg on 2016/7/15.
 */

@Component
@ApplicationPath("/jersey")
public class JerseyConfig extends ResourceConfig{
    public JerseyConfig(){
        // register endpoint

        // method 1:
        //packages("com.yue.jerseyexec.resource");

        // method 2:
        registerEndpoint();

    }
    private void registerEndpoint(){
        register(IHelloWorld.class);
    }
}
